package com.haichang.demomybatis.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import com.haichang.demomybatis.entity.Salesman;
import com.haichang.demomybatis.mapper.SalesmanMapper;
import org.springframework.web.bind.annotation.GetMapping;


@RestController
public class SalesmanController {
    

    @Autowired
    private SalesmanMapper salesmanMapper;

    @GetMapping("/salesman")
    public List<Salesman> query() {

        List<Salesman> salesmanList = salesmanMapper.selectList(null);
        return salesmanList;
    }
    

}
